package com.woniu.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.woniu.entity.PageData;
import com.woniu.entity.Result;
import com.woniu.entity.dto.LoginUserDTO;
import com.woniu.entity.dto.QueryUserDTO;
import com.woniu.entity.vo.UserCountDayVO;
import com.woniu.entity.vo.UserLoginVO;
import com.woniu.pojo.User;

import java.util.List;

/**
 * <p>
 *  服务类
 * </p>
 *
 * @author xiaosong
 * @since 2023-04-01
 */
public interface IUserService extends IService<User> {

    void register(LoginUserDTO loginUserDTO);

    UserLoginVO login(String mobile);

    PageData search(Integer currentPage, Integer pageSize, QueryUserDTO queryUserDTO);

    boolean nameExist(String name);

    int updateType(Integer id, Integer userType);

    User searchOne(Integer id);

    Integer updateOne(User user);

    Integer updatePassword(Integer id, String oldPassword, String newPassword);



    UserLoginVO getByOpenId(String giteeId);

    List<UserCountDayVO> countUsersByWeek();

    List<UserCountDayVO> countUsersByMonth();

    List<UserCountDayVO> countUsersByToday();

    List<UserCountDayVO> countUsersByYesterday();

    boolean selectVip(Integer userId);

//    void saveToken(LoginUserDTO loginUserDTO);

    User userIsExist(String name, String password);

    boolean updateUser(User user);

//    User getByToken(String token);
}
